/*
 * @Author: youknowHRT 1021300769@qq.com
 * @Date: 2024-10-09 19:45:38
 * @LastEditors: youknowHRT 1021300769@qq.com
 * @LastEditTime: 2025-02-11 23:05:51
 * @FilePath: /jedi-admin-nest/src/user/dto/update-user-password.dto.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { IsEmail, IsNotEmpty, MinLength } from 'class-validator';

export class UpdateUserPasswordDto {
  @IsNotEmpty({ message: '密码不能为空' })
  @MinLength(6, { message: '密码不能少于6位' })
  password: string;

  @IsNotEmpty({ message: '邮箱不能为空' })
  @IsEmail({}, { message: '邮箱格式不正确' })
  email: string;

  @IsNotEmpty({ message: '用户名不能为空' })
  username: string;

  @IsNotEmpty({ message: '验证码不能为空' })
  @MinLength(6, { message: '验证码不能少于6位' })
  captcha: string;
}
